<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理中心 - 商品列表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/Public/Admin/Styles/general.css" rel="stylesheet" type="text/css" />
    <link href="/Public/Admin/Styles/main.css" rel="stylesheet" type="text/css" />
    <link href="/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/Public/bootstrap/css/docs.min.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/Public/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<h1>
    <?php if($_page_btn_name): ?>
    <span class="action-span"><a href="<?php echo $_page_btn_link; ?>"><?php echo $_page_btn_name; ?></a></span>
    <?php endif; ?>
<span class="action-span1"><a href="<?php echo U('');?>">管理中心</a></span>
<span id="search_id" class="action-span1"> - <?php echo $_page_title; ?> </span>
<div style="clear:both"></div>
</h1>

<div class="form-div">
    <form action="/index.php/Admin/Goods/goodsList.html"  mthod = 'get' name="searchForm">
        <img src="/Public/Admin/Images/icon_search.gif" width="26" height="22" border="0" alt="search" />
        <!-- 分类 -->
        分类：
        <?php $catId = I('get.cat_id'); ?>
        <select name="cat_id">
            <option value="0">所有分类</option>
            <?php if(is_array($cateData)): foreach($cateData as $key=>$val): ?><option value="<?php echo ($val["id"]); ?>">
                    <?php echo str_repeat("-",8*$val['level']) . $val['cate_name']; ?>
                </option><?php endforeach; endif; ?>
        </select>
        <!-- 品牌 -->
        <p>品牌：</p>
        <?php buildSelect('brand','brand_id','id','brand_name',I('get.brand_id')); ?>
        <!-- 推荐 -->
        <select name="intro_type">
            <option value="0">全部</option>
            <option value="is_best">精品</option>
            <option value="is_new">新品</option>
            <option value="is_hot">热销</option>
        </select>
        <!-- 上架 -->
        <select name="ios">
            <option naem="all"       value=''>全部</option>
            <option name="shangjia" value="Y">上架</option>
            <option name="xiajia"   value="N">下架</option>
        </select>

        商品价格：
        从<input value="<?php echo I('get.fp'); ?>" type="text" name="fp" size="8">
        到<input value="<?php echo I('get.tp'); ?>" type="text" name="tp" size="8">
        </p>

        <br/>
            排序方式：
        <?php $odby =I('get.odby','id_desc')?>
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="id_desc">id降序
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="id_asc">id升序
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="price_desc">价格降序
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="pirce_asc">价格升序
        <p>
        <br/>
            <p>
            添加时间：
            <input type="text" name="fa" id="fa" value="<?php echo I('get.fa') ?>" size="20"/>到
            <input type="text" name="ta" id="ta" value="<?php echo I('get.ta') ?>" size="20"/>
        </p>
        <!-- 关键字 -->
        关键字: <input type="text" value="<?php echo I('get.gn') ?>" name="gn" size="15" />
        <input type="submit" value=" 搜索 " class="button" />
    </form>
</div>

<!-- 商品列表 -->
<form method="post" action="ACTION" name="listForm" onsubmit="">
    <div class="list-div" id="listDiv">
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th style="text-align: center">编号</th>
                <th style="text-align: center">主分类</th>
                <th style="text-align: center">扩展分类</th>
                <th style="text-align: center">品牌</th>
                <th style="text-align: center">品牌LOGO</th>
                <th style="text-align: center">商品名称</th>
                <th style="text-align: center">货号</th>
                <th style="text-align: center">价格</th>
                <th style="text-align: center">上架</th>
                <th style="text-align: center">精品</th>
                <th style="text-align: center">新品</th>
                <th style="text-align: center">热销</th>
                <th style="text-align: center">推荐排序</th>
                <th style="text-align: center">操作</th>
            </tr>
            <?php if(is_array($goodsList)): foreach($goodsList as $key=>$val): ?><tr>
                <td align="center"><?php echo ($val["id"]); ?></td>
                <td align="center" class="first-cell"><span><?php echo ($val["cate_name"]); ?></span></td>
                <td align="center" class="first-cell"><span><?php echo ($val["ext_cat_name"]); ?></span></td>
                <td align="center" class="first-cell"><span><?php echo ($val["brand_name"]); ?></span></td>
                <td align="center" class="first-cell"><?php echo showImage($val['sm_logo']);?></td>
                <td align="center" class="first-cell"><span><?php echo ($val["goods_name"]); ?></span></td>
                <td align="center"><span onclick="">aaa</span></td>
                <td align="center"><span><?php echo ($val["shop_price"]); ?></span></td>
                <td align="center"><img src="<?php if(($val["is_on_sale"] == Y)): ?>/Public/Admin/Images/yes.gif <?php else: ?> /Public/Admin/Images/no.gif<?php endif; ?>"/></td>
                <td align="center"><img src="<?php if(($val["is_best"] == 是)): ?>/Public/Admin/Images/yes.gif <?php else: ?> /Public/Admin/Images/no.gif<?php endif; ?>"/></td>
                <td align="center"><img src="<?php if(($val["is_new"] == 是)): ?>/Public/Admin/Images/yes.gif <?php else: ?> /Public/Admin/Images/no.gif<?php endif; ?>"/></td>
                <td align="center"><img src="<?php if(($val["is_hot"] == 是)): ?>/Public/Admin/Images/yes.gif <?php else: ?> /Public/Admin/Images/no.gif<?php endif; ?>"/></td>
                <td align="center"><span>100</span></td>
                <td align="center">
                <a href="<?php echo U('Goods/good_number');?>?id=<?php echo ($val["id"]); ?>" title="库存量"><img src="/Public/Admin/Images/icon_view.gif" width="16" height="16" border="0" /></a>
                <a href="<?php echo U('Goods/goodsEdit');?>?id=<?php echo ($val["id"]); ?>"  title='编辑'><img src="/Public/Admin/Images/icon_edit.gif" width="16" height="16" border="0" /></a>
                <a href="<?php echo U('Goods/goodsDel');?>?id=<?php echo ($val["id"]); ?>" onclick="return confirm('确定要放入回收站吗？')" title="回收站"><img src="/Public/Admin/Images/icon_trash.gif" width="16" height="16" border="0" /></a></td>
                <input type="text" hidden value="<?php echo ($val["brand_id"]); ?>" name="brand_id"/>
            </tr><?php endforeach; endif; ?>
        </table>

    <!-- 分页开始 -->

        <nav aria-label="..." style = "text-align:center">
            <ul class="pagination">
                <li><?php echo ($page); ?></li>
            </ul>
        </nav>

    <!-- 分页结束 -->
    </div>
</form>
<script src="/Public/Admin/Js/tron.js"></script>
<link href="/Public/datetimepicker/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/Public/datetimepicker/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/Public/datetimepicker/datepicker-zh_cn.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="/Public/datetimepicker/time/jquery-ui-timepicker-addon.min.css" />
<script type="text/javascript" src="/Public/datetimepicker/time/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" src="/Public/datetimepicker/time/i18n/jquery-ui-timepicker-addon-i18n.min.js"></script>
<script>
    // 添加时间插件
    $.timepicker.setDefaults($.timepicker.regional['zh-CN']);  // 设置使用中文

    $("#fa").datetimepicker();
    $("#ta").datetimepicker();
</script>

<!-- 引入行高亮显示 -->



<div id="footer">
    共执行 9 个查询，用时 0.025161 秒，Gzip 已禁用，内存占用 3.258 MB<br />
    版权所有 &copy; 2005-2012 上海商派网络科技有限公司，并保留所有权利。
</div>
</body>
</html>